package service.impl;

import bean.UserInfo;
import dao.IUserInfoDao;
import dao.impl.UserInfoDaoImpl;
import service.IUserInfoService;

import java.util.List;

public class UserInfoServiceImpl implements IUserInfoService {
    IUserInfoDao userInfoDao = new UserInfoDaoImpl();

    @Override
    public List<UserInfo> queryUserInfo() throws Exception{
        return userInfoDao.queryUserInfo();
    }

    @Override
    public boolean insertUserInfo(UserInfo userInfo) throws  Exception{
        return userInfoDao.insertUserInfo(userInfo);
    }

    @Override
    public boolean updateUserInfo(UserInfo userInfo) throws  Exception{
        return userInfoDao.updateUserInfo(userInfo);
    }

    @Override
    public boolean deleteUserInfo(int id) throws Exception{
        return userInfoDao.deleteUserInfo(id);
    }

}
